package com.example.test.controller;

import com.example.test.service.IFaceRecognitionService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @program: test
 * @description:
 * @author: qiu bo yang
 * @create: 2020-10-09 14:12
 **/
@Slf4j
@RestController
@RequestMapping("/record")
public class FaceRecognitionRecordController {
    @Autowired
    private IFaceRecognitionService faceRecognitionService;

    /**
     * 识别图片推送
     *
     * @param request
     * @param response
     */
    @PostMapping("/picture")
    public void recordPicture(HttpServletRequest request, HttpServletResponse response) {
        faceRecognitionService.recordPicture(request, response);
    }

    /**
     * 识别记录推送
     *
     * @param request
     * @param response
     */
    @PostMapping("/notice")
    public void recordNotice(HttpServletRequest request, HttpServletResponse response) {
        faceRecognitionService.recordNotice(request,response);
    }
}
